﻿@model GPS.ENTITYS.CrudModelDDTTN_KQTN

@{
    ViewBag.Title = "Sửa điểm KQTN học viên";
}



@using (Html.BeginForm("Edit", "GPS_DiemTotNghiep", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    <h3 class="text-center fdb-title-search-form">Sửa điểm tốt nghiệp</h3>
    <div id="tabs">
        <div id="tabs-1">
            @Html.Hidden("IsEdit", 0)
            @*@Html.HiddenFor(model => model.DTTN_KQTN_DVGTVT_MA);*@
            @Html.HiddenFor(model => model.DTTN_KQTN_DTTN_ID);
            @Html.HiddenFor(model => model.DTTN_KQTN_DTTN_QD_ID);
            @Html.HiddenFor(model => model.DTTN_HGPLX_MA);
            <label style="color:red">@ViewBag.ErrorDate</label>
            <fieldset class="fs_body">
                <legend class="head_title">Thông tin chi tiết điểm tốt nghiệp</legend>

                <div class="row margin-top-05">
                    <div class="col-md-2 control-label text-left">
                        Đơn vị đào tạo
                    </div>
                    <div class="col-md-4">
                        @Html.DropDownListFor(model => model.DTTN_KQTN_DVGTVT_MA, (SelectList)ViewBag.DVGTVT_MAs, new { @class = "form-control", @id = "ddlDVGTVT_MA", @readonly = "readonly" })

                    </div>

                    <div class="col-md-2 control-label">
                        Mã khóa học
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_KH_MA, new { @class = "form-control", @readonly = "readonly" })
                        </b>
                    </div>

                </div>

                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Mã Học viên
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_HV_MA, new { @class = "form-control", @readonly = "readonly" })
                        </b>
                    </div>

                    <div class="col-md-2 control-label">
                        Tên học viên
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBox("TEN_HV", (string)ViewBag.TEN_HV, new { @class = "form-control", @readonly = "readonly" })
                        </b>
                    </div>

                </div>



                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Ngày thi TN
                    </div>
                    <div class="col-md-4">
                        <b>

                            @Html.TextBoxFor(model => model.DTTN_KQTN_NGAYTN, "{0:dd/MM/yyyy}", new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_NGAYTN)
                        </b>
                    </div>
                    <div class="col-md-2 control-label">
                        Vắng LT
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.DropDownListFor(model => model.DTTN_KQTN_VANG_LT, new List<SelectListItem>
                                {
                                                    new SelectListItem() {Text = "", Value=""},
                                                    new SelectListItem() {Text = "Không", Value="0"},
                                                    new SelectListItem() {Text = "Có", Value="1"}

                                }, new { @class = "form-control" })
                        </b>
                    </div>

                </div>

                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Điểm LT
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_LT, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_LT)
                        </b>
                    </div>
                    <div class="col-md-2 control-label">
                        Sát hạch viên LT
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.DropDownListFor(model => model.DTTN_KQTN_LT_SHV_MA, (SelectList)ViewBag.SSHVs, new { @class = "form-control", @style = "width:300px", @id = "ddlDTTN_KQTN_LT_SHV_MA" })

                        </b>
                    </div>


                </div>
                <div class="row margin-top-05">

                    <div class="col-md-2 control-label">
                        Nhận xét của SHV LT
                    </div>
                    <div class="col-md-10">
                        @Html.TextAreaFor(model => model.DTTN_KQTN_NXSHV_LT, new { @class = "form-group", @rows = 5, @style = "width:100%;max-width:100%;" })
                    </div>
                </div>


                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Vắng TH
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.DropDownListFor(model => model.DTTN_KQTN_VANG_TH, new List<SelectListItem>
                                {
                                                    new SelectListItem() {Text = "", Value=""},
                                                    new SelectListItem() {Text = "Không", Value="0"},
                                                    new SelectListItem() {Text = "Có", Value="1"}

                                }, new { @class = "form-control" })
                        </b>
                    </div>

                    <div class="col-md-2 control-label">
                        Điểm TH
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_TH, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_TH)
                        </b>
                    </div>


                </div>
                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Sát hạch viên TH
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.DropDownListFor(model => model.DTTN_KQTN_TH_SHV_MA, (SelectList)ViewBag.SSHVs, new { @class = "form-control", @style = "width:300px", @id = "ddlDTTN_KQTN_TH_SHV_MA" })

                        </b>
                    </div>

                </div>
                <div class="row margin-top-05">

                    <div class="col-md-2 control-label">
                        Nhận xét của SHV TH
                    </div>
                    <div class="col-md-10">
                        @Html.TextAreaFor(model => model.DTTN_KQTN_NXSHV_TH, new { @class = "form-group", @rows = 5, @style = "width:100%;max-width:100%;" })
                    </div>
                </div>

                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Vắng TD
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.DropDownListFor(model => model.DTTN_KQTN_VANG_TD, new List<SelectListItem>
                                {
                                                    new SelectListItem() {Text = "", Value=""},
                                                    new SelectListItem() {Text = "Không", Value="0"},
                                                    new SelectListItem() {Text = "Có", Value="1"}

                                }, new { @class = "form-control" })
                        </b>
                    </div>

                    <div class="col-md-2 control-label">
                        Điểm TD
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_TD, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_TD)
                        </b>
                    </div>


                </div>
                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Sát hạch viên TD
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.DropDownListFor(model => model.DTTN_KQTN_TD_SHV_MA, (SelectList)ViewBag.SSHVs, new { @class = "form-control", @style = "width:300px", @id = "ddlDTTN_KQTN_TD_SHV_MA" })

                        </b>
                    </div>

                </div>
                <div class="row margin-top-05">

                    <div class="col-md-2 control-label">
                        Nhận xét của SHV TD
                    </div>
                    <div class="col-md-10">
                        @Html.TextAreaFor(model => model.DTTN_KQTN_NXSHV_TD, new { @class = "form-group", @rows = 5, @style = "width:100%;max-width:100%;" })
                    </div>
                </div>

                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Vắng CC
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.DropDownListFor(model => model.DTTN_KQTN_VANG_CC, new List<SelectListItem>
                                {
                                                    new SelectListItem() {Text = "", Value=""},
                                                    new SelectListItem() {Text = "Không", Value="0"},
                                                    new SelectListItem() {Text = "Có", Value="1"}

                                }, new { @class = "form-control" })
                        </b>
                    </div>

                    <div class="col-md-2 control-label">
                        Điểm CC
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_CC, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_CC)
                        </b>
                    </div>


                </div>
                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Sát hạch viên CC
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.DropDownListFor(model => model.DTTN_KQTN_CC_SHV_MA, (SelectList)ViewBag.SSHVs, new { @class = "form-control", @style = "width:300px", @id = "ddlDTTN_KQTN_CC_SHV_MA" })

                        </b>
                    </div>

                </div>
                <div class="row margin-top-05">

                    <div class="col-md-2 control-label">
                        Nhận xét của SHV CC
                    </div>
                    <div class="col-md-10">
                        @Html.TextAreaFor(model => model.DTTN_KQTN_NXSHV_CC, new { @class = "form-group", @rows = 5, @style = "width:100%;max-width:100%;" })
                    </div>
                </div>

                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Tổng điểm
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_TONG, new { @class = "form-control", @readonly = "readonly", @id = "DTTN_KQTN_TONGDIEM" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_TONG)
                        </b>
                    </div>
                    <div class="col-md-2 control-label">
                        Điểm trung bình
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_TB, new { @class = "form-control", @readonly = "readonly", @id = "DTTN_KQTN_TB" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_TB)
                        </b>
                    </div>

                </div>

                <div class="row margin-top-05">
                    <div class="col-md-2 control-label">
                        Điểm TBC
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_TBC, new { @class = "form-control",  @id = "DTTN_KQTN_TBC" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_TBC)
                        </b>
                    </div>
                    <div class="col-md-2 control-label">
                        Điểm TKTK
                    </div>
                    <div class="col-md-4">
                        <b>
                            @Html.TextBoxFor(model => model.DTTN_KQTN_TKKH, new { @class = "form-control", @readonly = "readonly", @id = "DTTN_KQTN_TKKH" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_TKKH)
                        </b>
                    </div>

                </div>


                <div class="row margin-top-05">

                    <div class="col-md-2 control-label">
                        Xếp hạng
                    </div>
                    <div class="col-md-4">
                        <b>

                            @Html.DropDownListFor(model => model.DTTN_KQTN_ID_XEPHANG, new List<SelectListItem>
                                {
                                                    new SelectListItem() {Text = "Không đạt", Value="1"},
                                                    new SelectListItem() {Text = "Trung bình", Value="2"},
                                                    new SelectListItem() {Text = "Trung bình khá", Value="3"},
                                                    new SelectListItem() {Text = "Khá", Value="4"},
                                                    new SelectListItem() {Text = "Giỏi", Value="5"},

                                }, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.DTTN_KQTN_ID_XEPHANG)
                        </b>
                    </div>

                </div>

                <div class="row margin-top-05">

                    <div class="col-md-2 control-label">
                        Mô tả
                    </div>
                    <div class="col-md-10">
                        @Html.TextAreaFor(model => model.DTTN_KQTN_MOTA, new { @class = "form-group", @rows = 5, @style = "width:100%;max-width:100%;" })
                    </div>
                </div>

            </fieldset>
        </div>
    </div>
    <br />
    <div class="row">
        <div class="col-md-12">
            <button type="submit" class="btn btn-danger btn-sm">
                <span class="glyphicon glyphicon-floppy-disk"></span> Cập nhật
            </button>
            &nbsp;&nbsp;
            @Html.ActionLink("Quay lại", "Index", null, new { @class = "btn btn-primary btn-sm" })
        </div>
    </div>
}
<link href="~/Content/bootstrap-datetimepicker.min.css" rel="stylesheet" />
<script src="~/Scripts/bootstrap-datetimepicker.min.js" charset="UTF-8"></script>
<script type="text/javascript" src="~/Scripts/locales/bootstrap-datetimepicker.fr.js" charset="UTF-8"></script>

<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>

<script src="~/Scripts/datepicker.js"></script>
<script src="~/Scripts/jquery-ui-1.11.4.js"></script>
<script src="~/Scripts/jquery.maskedinput.js"></script>
<script src="~/Scripts/jquery.maskMoney.js"></script>
<script src="~/Scripts/jquery.number.js"></script>
<script src="~/Scripts/jquery.masknumber.js"></script>
<script src="~/Scripts/moment.js"></script>


<script type="text/javascript">
    // Voi jQuery 1.9 > thi chi validate gia tri trong active tab
    // Muon validate nhung gia tri trong cac tab khac nua thi dung jquery.validate 1.8.1 or 1.7
    // mask edit cho truong ngay thang (su dung jquery.maskedinput)
    function ToJavaScriptDate(value) {
        if (value != null) {
            var pattern = /Date\(([^)]+)\)/;
            var results = pattern.exec(value);
            var dt = new Date(parseFloat(results[1]));
            return dt.getDate() + "/" + (dt.getMonth() + 1) + "/" + dt.getFullYear();
        }
        return null;
    }
</script>


@Styles.Render("~/Content/themes/base/css")


<script>
    $("#DTTN_KQTN_NGAYTN").datepicker({
        changeMonth: true,
        changeYear: true,

        dateFormat: 'dd/mm/yy'
    });

    $("#DTTN_KQTN_NGAYTN").mask("99/99/9999", { placeholder: "dd/mm/yyyy" });

    // mask decimal ở đây:
    $("#DTTN_KQTN_LT").number(true, 2);
    $("#DTTN_KQTN_TH").number(true, 2);
    $("#DTTN_KQTN_TD").number(true, 2);
    $("#DTTN_KQTN_CC").number(true, 2);
    $("#DTTN_KQTN_TBC").number(true, 2);
    $("#DTTN_KQTN_TKKH").number(true, 2);

    var tongdiem = 0;
    var trungbinh = 0.00;
    var tongketkh = 0.00;
    $("#DTTN_KQTN_LT").blur(function () {
        var _DTTN_KQTN_LT = $("#DTTN_KQTN_LT").val() == null || $("#DTTN_KQTN_LT").val() == "" ? "0" : $("#DTTN_KQTN_LT").val();//  parseFloat("10.33")
        var _DTTN_KQTN_TH = $("#DTTN_KQTN_TH").val() == null || $("#DTTN_KQTN_TH").val() == "" ? "0" : $("#DTTN_KQTN_TH").val();
        var _DTTN_KQTN_TD = $("#DTTN_KQTN_TD").val() == null || $("#DTTN_KQTN_TD").val() == "" ? "0" : $("#DTTN_KQTN_TD").val();
        var _DTTN_KQTN_CC = $("#DTTN_KQTN_CC").val() == null || $("#DTTN_KQTN_CC").val() == "" ? "0" : $("#DTTN_KQTN_CC").val();

        //them vào 2017-08-20
        var _DTTN_KQTN_TBC = $("#DTTN_KQTN_TBC").val() == null || $("#DTTN_KQTN_TBC").val() == "" ? "0" : $("#DTTN_KQTN_TBC").val();

        //  alert(_DTTN_KQTN_LT);
        tongdiem = parseFloat(_DTTN_KQTN_LT) + parseFloat(_DTTN_KQTN_TH) + parseFloat(_DTTN_KQTN_TD) + parseFloat(_DTTN_KQTN_CC);
        $("#DTTN_KQTN_TONGDIEM").val(tongdiem.toString());

        trungbinh = tongdiem / 4;
        $("#DTTN_KQTN_TB").val(trungbinh.toString());

        //them vào 2017-08-20 - tính điểm TKKH:

        tongketkh = ((parseFloat(_DTTN_KQTN_TBC) + 2 * trungbinh) / 3).toFixed(2);
        $("#DTTN_KQTN_TKKH").val(tongketkh.toString());
    });

    $("#DTTN_KQTN_TH").blur(function () {
        var _DTTN_KQTN_LT = $("#DTTN_KQTN_LT").val() == null || $("#DTTN_KQTN_LT").val() == "" ? "0" : $("#DTTN_KQTN_LT").val();//  parseFloat("10.33")
        var _DTTN_KQTN_TH = $("#DTTN_KQTN_TH").val() == null || $("#DTTN_KQTN_TH").val() == "" ? "0" : $("#DTTN_KQTN_TH").val();
        var _DTTN_KQTN_TD = $("#DTTN_KQTN_TD").val() == null || $("#DTTN_KQTN_TD").val() == "" ? "0" : $("#DTTN_KQTN_TD").val();
        var _DTTN_KQTN_CC = $("#DTTN_KQTN_CC").val() == null || $("#DTTN_KQTN_CC").val() == "" ? "0" : $("#DTTN_KQTN_CC").val();
        //them vào 2017-08-20
        var _DTTN_KQTN_TBC = $("#DTTN_KQTN_TBC").val() == null || $("#DTTN_KQTN_TBC").val() == "" ? "0" : $("#DTTN_KQTN_TBC").val();
        //  alert(_DTTN_KQTN_LT);
        tongdiem = parseFloat(_DTTN_KQTN_LT) + parseFloat(_DTTN_KQTN_TH) + parseFloat(_DTTN_KQTN_TD) + parseFloat(_DTTN_KQTN_CC);
        $("#DTTN_KQTN_TONGDIEM").val(tongdiem.toString());

        trungbinh = tongdiem / 4;
        $("#DTTN_KQTN_TB").val(trungbinh.toString());

        //them vào 2017-08-20 - tính điểm TKKH:

        tongketkh = ((parseFloat(_DTTN_KQTN_TBC) + 2 * trungbinh) / 3).toFixed(2);
        $("#DTTN_KQTN_TKKH").val(tongketkh.toString());
    });

    $("#DTTN_KQTN_TD").blur(function () {
        var _DTTN_KQTN_LT = $("#DTTN_KQTN_LT").val() == null || $("#DTTN_KQTN_LT").val() == "" ? "0" : $("#DTTN_KQTN_LT").val();//  parseFloat("10.33")
        var _DTTN_KQTN_TH = $("#DTTN_KQTN_TH").val() == null || $("#DTTN_KQTN_TH").val() == "" ? "0" : $("#DTTN_KQTN_TH").val();
        var _DTTN_KQTN_TD = $("#DTTN_KQTN_TD").val() == null || $("#DTTN_KQTN_TD").val() == "" ? "0" : $("#DTTN_KQTN_TD").val();
        var _DTTN_KQTN_CC = $("#DTTN_KQTN_CC").val() == null || $("#DTTN_KQTN_CC").val() == "" ? "0" : $("#DTTN_KQTN_CC").val();

        //them vào 2017-08-20
        var _DTTN_KQTN_TBC = $("#DTTN_KQTN_TBC").val() == null || $("#DTTN_KQTN_TBC").val() == "" ? "0" : $("#DTTN_KQTN_TBC").val();

        tongdiem = parseFloat(_DTTN_KQTN_LT) + parseFloat(_DTTN_KQTN_TH) + parseFloat(_DTTN_KQTN_TD) + parseFloat(_DTTN_KQTN_CC);
        $("#DTTN_KQTN_TONGDIEM").val(tongdiem.toString());

        trungbinh = tongdiem / 4;
        $("#DTTN_KQTN_TB").val(trungbinh.toString());

        //them vào 2017-08-20 - tính điểm TKKH:

        tongketkh = ((parseFloat(_DTTN_KQTN_TBC) + 2 * trungbinh) / 3).toFixed(2);
        $("#DTTN_KQTN_TKKH").val(tongketkh.toString());

    });

    $("#DTTN_KQTN_CC").blur(function () {
        var _DTTN_KQTN_LT = $("#DTTN_KQTN_LT").val() == null || $("#DTTN_KQTN_LT").val() == "" ? "0" : $("#DTTN_KQTN_LT").val();//  parseFloat("10.33")
        var _DTTN_KQTN_TH = $("#DTTN_KQTN_TH").val() == null || $("#DTTN_KQTN_TH").val() == "" ? "0" : $("#DTTN_KQTN_TH").val();
        var _DTTN_KQTN_TD = $("#DTTN_KQTN_TD").val() == null || $("#DTTN_KQTN_TD").val() == "" ? "0" : $("#DTTN_KQTN_TD").val();
        var _DTTN_KQTN_CC = $("#DTTN_KQTN_CC").val() == null || $("#DTTN_KQTN_CC").val() == "" ? "0" : $("#DTTN_KQTN_CC").val();

        //them vào 2017-08-20
        var _DTTN_KQTN_TBC = $("#DTTN_KQTN_TBC").val() == null || $("#DTTN_KQTN_TBC").val() == "" ? "0" : $("#DTTN_KQTN_TBC").val();

        tongdiem = parseFloat(_DTTN_KQTN_LT) + parseFloat(_DTTN_KQTN_TH) + parseFloat(_DTTN_KQTN_TD) + parseFloat(_DTTN_KQTN_CC);
        $("#DTTN_KQTN_TONGDIEM").val(tongdiem.toString());

        trungbinh = tongdiem / 4;
        $("#DTTN_KQTN_TB").val(trungbinh.toString());

        //them vào 2017-08-20 - tính điểm TKKH:

        tongketkh = ((parseFloat(_DTTN_KQTN_TBC) + 2 * trungbinh) / 3).toFixed(2);
        $("#DTTN_KQTN_TKKH").val(tongketkh.toString());

    });

    $("#DTTN_KQTN_TBC").blur(function () {
        var _DTTN_KQTN_LT = $("#DTTN_KQTN_LT").val() == null || $("#DTTN_KQTN_LT").val() == "" ? "0" : $("#DTTN_KQTN_LT").val();//  parseFloat("10.33")
        var _DTTN_KQTN_TH = $("#DTTN_KQTN_TH").val() == null || $("#DTTN_KQTN_TH").val() == "" ? "0" : $("#DTTN_KQTN_TH").val();
        var _DTTN_KQTN_TD = $("#DTTN_KQTN_TD").val() == null || $("#DTTN_KQTN_TD").val() == "" ? "0" : $("#DTTN_KQTN_TD").val();
        var _DTTN_KQTN_CC = $("#DTTN_KQTN_CC").val() == null || $("#DTTN_KQTN_CC").val() == "" ? "0" : $("#DTTN_KQTN_CC").val();

        //them vào 2017-08-20
        var _DTTN_KQTN_TBC = $("#DTTN_KQTN_TBC").val() == null || $("#DTTN_KQTN_TBC").val() == "" ? "0" : $("#DTTN_KQTN_TBC").val();

        tongdiem = parseFloat(_DTTN_KQTN_LT) + parseFloat(_DTTN_KQTN_TH) + parseFloat(_DTTN_KQTN_TD) + parseFloat(_DTTN_KQTN_CC);
        $("#DTTN_KQTN_TONGDIEM").val(tongdiem.toString());

        trungbinh = tongdiem / 4;
        $("#DTTN_KQTN_TB").val(trungbinh.toString());

        //them vào 2017-08-20 - tính điểm TKKH:

        tongketkh = ((parseFloat(_DTTN_KQTN_TBC) + 2 * trungbinh) / 3).toFixed(2);
        $("#DTTN_KQTN_TKKH").val(tongketkh.toString());

    });

    $("#DTTN_KQTN_VANG_LT").change(function () {
        var val = $(this).val();
        if (val == "1") {
            $("#DTTN_KQTN_LT").attr('readonly', true);
        }
        else {
            $("#DTTN_KQTN_LT").attr('readonly', false);
        }

    });

    $("#DTTN_KQTN_VANG_TH").change(function () {
        var val = $(this).val();
        if (val == "1") {
            $("#DTTN_KQTN_TH").attr('readonly', true);
        }
        else {
            $("#DTTN_KQTN_TH").attr('readonly', false);
        }

    });

    $("#DTTN_KQTN_VANG_TD").change(function () {
        var val = $(this).val();
        if (val == "1") {
            $("#DTTN_KQTN_TD").attr('readonly', true);
        }
        else {
            $("#DTTN_KQTN_TD").attr('readonly', false);
        }

    });

    $("#DTTN_KQTN_VANG_CC").change(function () {
        var val = $(this).val();
        if (val == "1") {
            $("#DTTN_KQTN_CC").attr('readonly', true);
        }
        else {
            $("#DTTN_KQTN_CC").attr('readonly', false);
        }

    });


</script>







